<?php

namespace App\Http\Controllers\Article;

use App\Http\Controllers\Controller;
use App\Models\Article;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class ArticleController extends Controller
{
    // 获取文章列表
    public function index(Request $request)
    {
        DB::enableQueryLog();
        $items = Article::has('comments', '>=', 2)->get();
        DB::disableQueryLog();
        dump(DB::getQueryLog());
        dd($items);
    }

    // 获取文章详情
    public function show($id)
    {
        //
    }
}
